package sanshi.contect.udpstarter.config;


import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import sanshi.contect.udpstarter.service.PiledUpMsgHandler;
import sanshi.contect.udpstarter.service.UDPMsgHandler;
import sanshi.contect.udpstarter.service.impl.DefaultPiledUpMsgServiceImpl;
import sanshi.contect.udpstarter.service.impl.DefaultUdpMsgHandlerImpl;

/**
 * 默认消息处理类
 * @author sanshi
 */
@Configuration
public class DefaultUDPHandlerConfig {

    @Bean
    @ConditionalOnMissingBean
    public UDPMsgHandler udpMsgHandler(){
        return new DefaultUdpMsgHandlerImpl();
    }


    @Bean
    @ConditionalOnMissingBean
    public PiledUpMsgHandler msgPiledUpService(){
        return new DefaultPiledUpMsgServiceImpl();
    }
}
